home *** CD-ROM | disk | FTP | other *** search
- Path: news.cs.utah.edu!usenet
- From: bendixen@eng.utah.edu (Mason Bendixen)
- Newsgroups: comp.lang.c++
- Subject: Template instantiation in g++
- Date: 8 Jan 1996 01:49:21 GMT
- Organization: University of Utah Computer Science Department
- Message-ID: <4cpt71$sm6@magus.cs.utah.edu>
- Reply-To: bendixen@eng.utah.edu
- NNTP-Posting-Host: cadesm58.eng.utah.edu
-
- Hi,
- I just completed a good sized project making heavy usage of
- templates using BC++ 4.5, and after everything was working well
- I decided to try to port it to SparcStation at school running
- SunOS using g++. I had been careful careful not to use any
- implementation specific features or any of C++'s relatively new
- features so I was surprised that the program failed to link.
- When I tried to compile a simple test program that used only
- a few of the features in my templatized library with g++, I got:
-
- 76 cadesm58:hw1% g++ -o tester tester.C
- collect2: ld returned 2 exit status
- ld: Undefined symbol
- ListIter<int>::insert_at(int, int const &)
- List<int>::car(void)
- List<int>::remove(void)
- List<int>::cons(int const &)
- ListIter<int>::operator[](int) const
- ListIter<int>::operator[](int)
- List<int>::end(void)
- ListIter<int>::remove(int)
-
- I don't even use these functions in test program. I tried Sun's
- own CC but it seems ancient in its language support. Is anyone
- familar with g++'s template support? It seems to have always
- worked for me in the past, but this is extremely frustrating.
-
- Thanks (Please respond directly by E-Mail),
- Mason Bendixen
-
-
-
-